package com.tgy.hash.type;

import lombok.Data;

/**
 * @Author: tgy
 * @Date: 2020-09-24 19:00
 */
//@Data
public class PersonHash {

    private String name;

    private Integer age;

    private Float score;


//    @Override
//    public int hashCode() {
//
//        int hashCode = 0;
//
//        hashCode = hashCode * 31 + (name == null?0:name.hashCode());
//
//        hashCode = hashCode * 31 + (age == null?0:age.hashCode());
//
//        return hashCode * 31 + (score == null?0:score.hashCode());
//    }


    public static void main(String[] args) {

        PersonHash personHash = new PersonHash();
//        personHash.setAge(21);
        System.out.println(personHash.hashCode());
    }
}
